ink
Type
property
Summary
Specifies the kind of transparency an object is drawn with.
Syntax
set the ink of <object> to <inkMode>
Description
Use the ink property to specify how the color of each pixel of an object combines with the color of the pixel underneath it to create the final color shown on the screen.
The srcCopy mode simply puts the object on top of the background; the background does not show through or affect the final color at all.
You can use other transfer modes with the ink property to create special transparent or partially transparent effects, or to invert the colors of an object or the colors underneath the object, or to combine the object's colors with the colors under the object.
There are 25 transfer modes:
Structural Blends (Porter Duff operators):
- blendClear
- blendSrc
- blendDst
- blendSrcOver
- blendDstOver
- blendSrcIn
- blendDstIn
- blendSrcOut
- blendDstOut
- blendSrcAtop
- blendDstAtop
- blendXor
Image Processing Blends (SVG/PDF operators):
- blendPlus
- blendMultiply
- blendScreen
- blendOverlay
- blendDarken
- blendLighten
- blendDodge
- blendBurn
- blendHardLight
- blendSoftLight
- blendDifference
- blendExclusion
Bitwise - This ink has been deprecated from LiveCode 5.0
- srcCopy
The rendered pixels of an object are combined with the corresponding background pixels using the specified ink before the blendLevel is applied.
Most of the structural blends require that an ancestor of the object be a container with an alpha channel. If this is not the case the behaviour of the blend is undefined. Containers (cards and groups) can be forced to have an alpha channel by setting their ink to something other than srcCopy, or by setting their blendLevel to something other than 0.
Parameters
Name | Type | Description |
---|---|---|
object | the name of the object | |
inkmode | the name of the ink |
Examples
set the ink of graphic "Floating" to blendClear
set the ink of field "Ghost" to blendPlus
Related
glossary: object, property, pixel, background
keyword: string
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile